package depart_router

import (
	"benkendSystem/api/dept_api"
	"benkendSystem/middleware"
	"github.com/gin-gonic/gin"
)

// DepartRouter 部门路由
func DepartRouter(r *gin.RouterGroup) {
	depart := r.Group("/depart").Use(middleware.LoginAuthCheck())
	{
		depart.POST("/add", middleware.CheckMenu("departAdd"), dept_api.AddDepartment)
		depart.POST("/get", middleware.CheckMenu("departGet"), dept_api.GetDepartList)
		depart.POST("/update", middleware.CheckMenu("departUpdate"), dept_api.UpdateDepart)
		depart.POST("/delete", middleware.CheckMenu("departDelete"), dept_api.DeleteDepartment)
		depart.POST("/adduserfordepart", middleware.CheckMenu("addUserForDepart"), dept_api.AddDepartForUser)
		depart.POST("/getuserfromdepart", middleware.CheckMenu("getUserForDepart"), dept_api.GetUserFromDepart)
	}
}
